
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html lang="zh-cm">
<head>
    <%@include file="/WEB-INF/pages/common/head.jsp"%>
</head>
<body>
    <div class="container-fluid">
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>查询条件</strong>
                <a href="#content" class="pull-right" data-toggle="collapse"><i id="chervron" class="glyphicon glyphicon-chevron-down"></i></a>
            </div>
            <div id="content" class="panel-collapse collapse in">
                <div class="panel-body">
                    <form action="" class="form-inline" method="post" id="condition">
                        <lable>角色名称</lable>
                        <input type="text" class="form-control" id="roleName" name="roleName" placeholder="角色名称"/>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <lable>角色状态</lable>
                        <select name="deleteFlag" id="deleteFlag" class="form-control">
                            <option value="-1">全部</option>
                            <option value="0">可用</option>
                            <option value="1">禁用</option>
                        </select>

                        <div class="pull-right">
                            <button class="btn btn-primary" type="button" onclick="search4Role()"><i class="glyphicon glyphicon-search"></i> 查 询</button>
                        </div>
                    </form>
                </div>
            </div>
            <div class="pull-right" style="margin-top: 20px;margin-right: 15px">
                <button type="button" class="btn btn-success" onclick="addRole()"><i class="glyphicon glyphicon-plus"></i> 新 增</button>
                <button type="button" class="btn btn-success" onclick="prepareGrant()"><i class="glyphicon glyphicon-edit"></i> 授 权</button>
            </div>
            <table id="table" data-toggle="table"
                                data-pagination="true"
                                data-side-pagination="server"
                                data-url="sys/role/searchPager"
                                data-toolbar="#toolbar"
                                data-toolbar-algin="right">
                <thead>
                    <tr>
                        <th data-radio="true"></th>
                        <th data-field="roleId">序号</th>
                        <th data-field="roleCode">角色编码</th>
                        <th data-field="roleName">角色名称</th>
                        <th data-field="deleteFlag" data-formatter="FormatState">状态</th>
                        <th data-field="roleDesc">描述</th>
                        <th data-formatter="FormatOperation">操作</th>
                    </tr>
                </thead>
            </table>
        </div>
        <div id="grant">
        </div>



        <div class="hidden" id="UpRole">
            <form action="" id="updateRole" class="form-horizontal">
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色编码</div>
                    <div class="col-md-6">
                        <input type="text" name="roleCode" class="form-control" disabled="disabled">
                    </div>
                    <input type="hidden" name="roleId" class="form-control">
                </div>
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色名称</div>
                    <div class="col-md-6">
                        <input type="text" name="roleName" class="form-control">
                    </div>
                </div>
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色描述</div>
                    <div class="col-md-6">
                        <textarea name="roleDesc" id="roleDesc" cols="30" rows="5" class="form-control">

                        </textarea>
                    </div>
                </div>
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色状态</div>
                    <div class="col-md-6">
                        <select name="deleteFlag" class="form-control">
                            <option value="0">可用</option>
                            <option value="1">禁用</option>
                        </select>
                    </div>
                </div>

            </form>
        </div>



        <div class="hidden" id="AddRole">
            <form action="" id="adRole" class="form-horizontal">
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色编码</div>
                    <div class="col-md-6">
                        <input type="text" name="roleCode" class="form-control">
                    </div>
                    <input type="hidden" name="roleId" class="form-control">
                </div>
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色名称</div>
                    <div class="col-md-6">
                        <input type="text" name="roleName" class="form-control">
                    </div>
                </div>
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色描述</div>
                    <div class="col-md-6">
                        <textarea name="roleDesc" id="roleDescAdd" cols="30" rows="5" class="form-control">

                        </textarea>
                    </div>
                </div>
                <div class="row" style="margin: 10px auto">
                    <div class="col-md-3 col-md-push-1 text-center" style="margin: 5px auto">角色状态</div>
                    <div class="col-md-6">
                        <select name="deleteFlag" class="form-control">
                            <option value="0">可用</option>
                            <option value="1">禁用</option>
                        </select>
                    </div>
                </div>

            </form>
        </div>




    </div>






<%@include file="/WEB-INF/pages/common/modal.jsp"%>
    <script src="res/js/role.js"></script>
</body>
</html>




